// 创建store对象,配置中间件,配置调试工具,合并reducer

import { createStore, applyMiddleware, combineReducers } from 'redux'
import { composeWithDevTools } from 'redux-devtools-extension'
import thunk from 'redux-thunk'
import reducer from './reducer'
// 合并reducer. 只有一个reducer也可以合并,只是没必要而已
const rootReducer = combineReducers({
  zs: reducer,
})

const store = createStore(
  rootReducer,
  composeWithDevTools(applyMiddleware(thunk))
)

export default store


